<template><!-- 居家检测 /编辑居家检测-->
    <div class="quan">
     <div class="ju">
        <span>居家检测/新增居家检测</span>
     </div>
     <div class="content">
        <div class="zhong">
            <div class="nei">
                <span class="hong">*</span><span>id:</span>
            </div>
            <input type="text" v-model="id"><br>
            <div class="nei">
                <span class="hong">*</span><span>姓名:</span>
            </div>
            <input type="text" v-model="contnei.name"><br>
            <div class="nei">
                <span class="hong">*</span><span>性别:</span>
            </div>
            <div class="mb-2 flex items-center text-sm">
                <el-radio-group v-model="radio1 " class="ml-4">
                <el-radio label="男" size="large">男</el-radio>
                <el-radio label="女" size="large">女</el-radio>
                </el-radio-group>
            </div><br>
            <div class="nei">
                <span class="hong">*</span><span>身份证号:</span>
            </div>
            <input type="text" v-model="contnei.shen"><br>
            <div class="nei">
                <span class="hong">*</span><span>联系方式:</span>
            </div>
            <input type="text" v-model="contnei.phone"><br>
            <div class="nei">
                <span class="hong">*</span><span>籍贯省份:</span>
            </div>
            <input type="text" v-model="contnei.ji"><br>
            <div class="nei">
                <span class="hong">*</span><span>籍贯地址:</span>
            </div>
            <input type="text" v-model="contnei.guan"><br>
            <div class="nei">
                <span class="hong">*</span><span>现居住地:</span>
            </div>
            <input type="text" v-model="contnei.ju"><br>
            <div class="nei">
                <span class="hong">*</span><span>详细地址:</span>
            </div>
            <input type="text" v-model="contnei.xiang"><br>
            <div class="nei">
                <span class="hong">*</span><span>监测开始时间:</span>
            </div>
            <input type="text" v-model="contnei.kai"><br>
            <div class="nei">
                <span class="hong">*</span><span>监测解除日期:</span>
            </div>
            <input type="text" v-model="contnei.jie"><br>
            <div class="hei">
                <span>*</span><span>备注:</span>
            </div>
            <textarea >{{ contnei.bei }}</textarea>
            <div class="wei">
                <router-link to="/meij"><el-button class="fan" >返回</el-button></router-link>
                <el-button type="primary" @click="zeng">增加</el-button>
            
            
        </div>
        </div>
        
        
     </div>
     
     
    

    </div>
</template>

<script lang="ts">
import { defineComponent,ref,reactive,toRefs } from 'vue'
import {useRoute} from 'vue-router'
import axios from '@/views/chen/http'
// import { } form '@/util/date'
export default defineComponent({
    name:"xju",
    setup(){
        const route=useRoute();
        // const jie=route.query.key //接收跳转参数
        // console.log(jie);
        let contnei1=reactive ({
            contnei:{
            lai:'手动登记',//来源：
            name:"",//姓名
            gender:"",//性别
            shen:"",//身份证号
            phone:"",//联系方式
            ji:" ",//籍贯省份
            guan:"",//籍贯地址
            ju:" ",//现居住地
            xiang:"",//详细地址
            kai:"",//检测开始日期
            jie:"",//检测结束日期
            bei:"无"//备注
            }
            
        });
        let id=ref();//id
        let radio1=ref(contnei1.contnei.gender);
        let bb=ref("次密接").value;
        let cc=ref("核实后转居家监测").value;
        let dd=ref('管理员').value;
        let ee=ref('2023-02-28').value;
        let ff=ref('监测中').value;
        const zeng=()=>{
            let a=contnei1.contnei.lai;
            let b=contnei1.contnei.name;
            let c=radio1.value;
            let d=contnei1.contnei.shen;
            let e=contnei1.contnei.phone;
            let f=contnei1.contnei.ji;
            let f1=contnei1.contnei.ju;
            let j=contnei1.contnei.guan;
            let h=contnei1.contnei.xiang;
            let i=contnei1.contnei.kai;
            let g=contnei1.contnei.jie;
            let k=contnei1.contnei.bei;
            let aa=id.value;
             //状态
            console.log(typeof b);
            
            
        //    if (c){
        //      alert("添加成功")
        //    }
        //    else{
        //     alert("把内容输入完才可以添加")
        //     // console.log(c);
            
        //    }
        //    axios({
        //     method:"post",url:"homeMonitoring/addContact",
        //     params:{
        //         id:aa,
        //         name:b,
        //         sex:c,
        //         idCard:d,
        //         phoneNum:e,
        //         residenceAddress:f,
        //         nativeAddress:j,
        //         nowAddress:f1,
        //         address:h,
        //         jointType:bb,
        //         source:cc,
        //         registrant:dd,
        //         registrationDate:ee,
        //         startDate:i,
        //         removeDate:g,
        //         status:ff,
        //         notes:k
        //     }
        //    }).then((res)=>{
        //     console.log('添加成功');
        //    })
        }
        
        return{...toRefs(contnei1),radio1,zeng,id,bb,cc,dd,ee,ff}
    }
})


</script>

<style scoped lang="less">
.hh{
    width: 1136px;
    height: 800px;
    background-color: rgb(255, 255, 255);
    display: flex;
    justify-content: center;
}
.quan{
    width: 100%;
    height: 700px;
}
// 设置表头样式
/deep/ .el-table th{
    background-color: #f9f9f9 !important; 
    color: black;
    Font-weight:400;// 字体粗细
    
}
.ju{
    padding: 20px 0px 20px 0px;
}
.head{
    background-color: #ffffff;
    width: 1136px;
    height: 172px !important;
}
.zhong{
    position: relative;;
    width: 100%;
    height: 100%;
    padding:30px 0px 50px 20px;
    background-color: #ffffff;
}
.content{
    width: 100%;
   

}
.nei{
    display:inline-block ;
    width: 122px;
    margin: 0px 20px 20px 20px;
    text-align: right;
}
.hei{
    display:inline-block ;
    width: 122px;
    margin: 0px 20px 180px 20px;
    text-align: right;
}
.zhong span{
    font-size:14px
}

.wei{
    width: 100%;
    text-align:center;
    padding-top:20px
}
.wei a{
    margin-left:20px
}
.hong{
    color: rgb(255, 0, 0);
}
textarea{
    resize: none;
    width: 400px ;
    height: 150px ;
    border-radius: 10px ;
    padding-left:10px ;
    position: absolute;
    top:600px
}
input{
    width: 400px;
    height: 40px;
    border-radius: 10px;
    padding-left:10px
}
.mb-2{
    display: inline;
}
.fan{
    margin-right:20px
}
</style>